package com.stedu.config;

import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;

public class WebInitializer extends AbstractAnnotationConfigDispatcherServletInitializer {
    //Spring
    @Override
    protected Class<?>[] getRootConfigClasses() {
        return new Class[]{MainConfig.class};
    }
    //spring-mvc
    @Override
    protected Class<?>[] getServletConfigClasses() {
        return new Class[]{WebConfig.class};
    }
//前端控制器拦截的位置
    @Override
    protected String[] getServletMappings() {
        return new String[]{"/"};
    }
}
